package exam.day34;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();
        str = str.replaceAll("-", "");
        char[] arr = str.toCharArray();
        int ret = 0;
        for(int i = 0; i < 9; i++) {
            ret += (arr[i] - '0') * (i + 1);
        }

        int mod = ret % 11;
        if(mod == 10) {
            if(arr[10] == 'X') {
                System.out.println("Right");
            } else {
                for(int i = 0; i < 9; i++) {
                    System.out.print(arr[i]);
                    if(i == 0 || i == 3 || i == 8) {
                        System.out.print("-");
                    }
                }
                System.out.print("X");
            }
        } else {
            if(mod == arr[10] - '0') {
                System.out.println("Right");
            } else {
                for(int i = 0; i < 9; i++) {
                    System.out.print(arr[i]);
                    if(i == 0 || i == 3 || i == 8) {
                        System.out.print("-");
                    }
                }
                System.out.print(mod);
            }
        }
    }
}
